package Class.senior.demo10;

public class GenericClass {
    // 定义student
    private String name;
    private Integer age;
    private String address;
    private String like;

    public GenericClass(String name, Integer age, String address, String like) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.like = like;
    }

    // 原来的toString无法识别hashMap
    // 改写toString
    @Override
    public String toString() {
        return "Student [name=" + name + ", age=" + age + ", address=" + address + ", like=" + like + "]";
    }
}
